Several methods are conventionally known for executing the Java™ programs by information processing apparatus.
As one of the methods, a scheme called as the interpreter scheme is known. In the interpreter scheme, the information processing apparatus compiles a source file to convert it into an intermediate code called as the Java byte code. Then, the information processing apparatus executes the program by interpreting the Java byte code by the Java VM (Virtual Machine) and executing processes at the CPU (Central Processing Unit) based on that interpretation.
As other method, a scheme referred to as the accelerator scheme is known. The accelerator scheme is a scheme to execute the Java bite code by a hardware. For example, a part of the Java byte code in the program is executed by the hardware, while the execution of the Java byte code which performs relatively complicated operation is executed by software. Generally, the accelerator scheme can execute the process at a higher speed compared to the interpreter scheme.
Further, as other method, a scheme referred to as the JIT (Just In Time) compiler scheme is known. The JIT compiler scheme is a scheme to directly execute the execution code by the CPU while compiling the Java byte code by part by part to convert it into an execution code (also referred to as a native code). In the JIT compiler scheme, successive Java byte codes can be optimized and complied (execution instruction expansion), so that the compilation result can be executed at a high speed.
Further, the following conventional arts have been known as techniques for reducing time for the execution of the program. First, a related art has been known that performs the byte code execution and the compilation process in parallel by using multi-task process in a single CPU system (for example, Japanese Laid-open Patent Publication No. 2004-355277). Second, a related art has been known in which one CPU expresses a Java program as an intermediate code while another CPU performs compilation in a unit of class file and the another CPU executes the compilation result (for example, Japanese Laid-open Patent Publication No. 2005-108126).
In the related interpreter schemes, however, since the program is executed while the Java byte code is interpreted during execution period, the execution of the individual process becomes slower, which results in longer total time for the execution of the program. Therefore, it has been difficult to efficiently perform the execution of the Java program.
In the related accelerator scheme, it is requested to implement the hardware Java accelerator circuit, which becomes costly. Further, it is difficult for redundant processes, if any, to be optimized when executing the instruction at the hardware circuit and thus the execution of the process becomes slower, which results in longer total time for the execution of the program. Therefore, it has been difficult to efficiently perform the execution of the Java program.
Further, in the JIT compile scheme, the time for compiling the Java byte code is requested. The Java program performs compilation in a unit of class file of the Java byte code or in a unit of process included in the class file (called as “method”) and, upon the completion of compiling the class file or the method, calls and executes the process. Thus, for a lengthy class file or method, compilation takes longer time causing the delay of the start of the process, which results in longer total time for the execution of the program. Further, in the lengthy class file or method, the process to be actually executed is a part of the class file or method in many cases. In this case, there is a problem of taking time for unnecessary compiling process. Therefore, it has been difficult to efficiently perform the execution of the Java program.
Furthermore, in the first related art, malfunction may occur due to the replacement of the queues of the compilation request when a plurality of CPUs are used, so that adaptation to the multi-core system has been difficult. Therefore, it is difficult for the compilation and the execution of the Java byte code to be performed in parallel resulting in longer total time for the execution of the program due to the time for the compilation. Therefore, it has been difficult to efficiently perform the execution of the Java program.
Further, in the second related art, it is difficult to adapt it to the compilation performed in a unit of block such as a method, because the timing of the compilation and the operation such as the passing operation of the compilation result are unclear. In the compilation performed in a unit of class, there has been a concern that the redundant compilation may likely occur, still resulting in longer total time for the execution of the program. Therefore, it has been difficult to efficiently perform the execution of the Java program.